Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emv fixes #702

Merged
merged 29 commits into from
Feb 15, 2024
Merged

Emv fixes #702

merged 29 commits into from
Feb 15, 2024

Conversation

wosk
Copy link
Contributor

@wosk wosk commented Feb 2, 2024

What's new

  • Gazprombank card read crash fixed
  • Parser improvements (cardholder name parsing, some EMV cards that was not able to parse before this PR is now able to parse)
  • EMV protocol detect false positive result fixed
  • Transactions render fixed

Verification

  • Read Gazprombank EMV card. Make sure that flipper doesnt crash

Checklist (For Reviewer)

  • PR has description of feature/bug
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@wosk wosk marked this pull request as draft February 10, 2024 00:59
@Leptopt1los Leptopt1los self-requested a review February 10, 2024 17:03
@Leptopt1los Leptopt1los self-assigned this Feb 10, 2024
@Leptopt1los Leptopt1los marked this pull request as ready for review February 10, 2024 19:46
Copy link
Member

@Leptopt1los Leptopt1los left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to load saved dump

@Willy-JL
Copy link
Contributor

FYI, im seeing empty transaction history on my mastercard with this PR's changes, shows fine without. not sure where exactly the issue would be, dont see any changes related to transactions at a first sweep through the diff...

either way great work, looking forward to this :)

@Willy-JL
Copy link
Contributor

Willy-JL commented Feb 15, 2024

i was able to get transaction history to work again for my mastercard by reverting the emv_poller_read_afl() function to its state before this PR. i found this by looking at logs, stripping out most of them and looking for the SFI attempts, this is what I see:

working (gets transaction history) (dev branch):

[T][EMVPoller] SFI 0x2 record 1:
[T][EMVPoller] SFI 0xB record 1:
[T][EMVPoller] SFI 0xB record 2:
[T][EMVPoller] SFI 0xB record 3:
[T][EMVPoller] SFI 0xB record 4:
[T][EMVPoller] SFI 0xB record 5:
[T][EMVPoller] SFI 0xB record 6:
[T][EMVPoller] SFI 0xB record 7:
[T][EMVPoller] SFI 0xB record 8:
[T][EMVPoller] SFI 0xB record 9:
[T][EMVPoller] SFI 0xB record 10:

broken (no transactions info) (pr head):

[T][EMVPoller] SFI 0x2 record 1:
[T][EMVPoller] SFI 0x4 record 1:
[T][EMVPoller] SFI 0x4 record 2:
[T][EMVPoller] SFI 0x4 record 3:
[T][EMVPoller] SFI 0x4 record 4:
[T][EMVPoller] SFI 0x2 record 2:
[T][EMVPoller] SFI 0x3 record 1:

@Leptopt1los
Copy link
Member

@Willy-JL Thank you! the problem was that the attempt to brute force files 2-3 was before reading transactions. Some cards, after attempting to read a record that does not exist on them, refuse to respond to subsequent requests. this seems to be done for security reasons

@Leptopt1los
Copy link
Member

@wosk thank you for the productive collaboration!

@xMasterX xMasterX merged commit 200a613 into DarkFlippers:dev Feb 15, 2024
@Willy-JL
Copy link
Contributor

can confirm the transactions work again, thanks!

@wosk wosk deleted the emv-fixes branch June 17, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants